# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=libertine-git
_pkgname=libertine
pkgver=r465.4ae89b2
pkgrel=2
pkgdesc='A sandbox for running legacy deb-based X11 applications'
url='https://github.com/ubports/libertine'
arch=(x86_64 i686 armv7h aarch64)
license=(GPL3)
conflicts=(libertine)
provides=(libertine)
depends=(python3 gtest qt5-base qt5-quickcontrols)
makedepends=(git cmake cmake-extras-git dbus-test-runner intltool)
source=('git+https://github.com/ubports/libertine.git')
sha256sums=('SKIP')

BUILDENV+=('!check') # Some tests are broken

prepare() {
  cd ${_pkgname}
  git checkout bionic
}

pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

build() {
  cd ${_pkgname}
  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR="lib/" .
  make
}

check() {
  cd ${_pkgname}
  make ARGS+="--output-on-failure" test
}

package() {
  cd ${_pkgname}
  make DESTDIR="${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
